package com.mouliu.base.syn13;

import java.util.concurrent.TimeUnit;

/**
 * @author mouliu
 * @create 2018-03-31-上午10:12
 */
public class TimeUintTest {
    private TimeUnit timeUnit = TimeUnit.DAYS;

    public static void main(String[] TimeUintTest){
        TimeUintTest tut = new TimeUintTest();
        tut.outInfo();


    }
    public void outInfo(){
        System.out.println(timeUnit.name());
        System.out.println(timeUnit.toDays(1));
        System.out.println(timeUnit.toHours(1));
        System.out.println(timeUnit.toMinutes(1));
        System.out.println(timeUnit.toSeconds(1));
        System.out.println(timeUnit.toMillis(1));
        System.out.println(timeUnit.toMicros(1));
        System.out.println(timeUnit.toNanos(1));
        System.out.println((timeUnit.convert(1, TimeUnit.DAYS)) + timeUnit.name());
        System.out.println((timeUnit.convert(24, TimeUnit.HOURS)) + timeUnit.name());
        System.out.println((timeUnit.convert(1440, TimeUnit.MINUTES)) + timeUnit.name());
        System.out.println("-------------------");
    }
}
